package com.party.core.service.analysis;

import com.party.common.paging.Page;
import com.party.core.model.analysis.StatisticsFunnelCounter;
import com.party.core.service.IBaseService;

import java.util.List;
import java.util.Map;

/**
 * @program: party-temp
 * @description: 统计漏斗转化情况接口实现
 * @author: yuguangqing
 * @create: 2018-09-05 16:00
 **/
public interface IStatisticsFunnelCountService extends IBaseService<StatisticsFunnelCounter> {

    /**
     * 批量插入漏斗转化统计结果到数据库中(tj_funnel_count)
     * @param funnelCounterList
     * @return
     */
    boolean batchInsert(List<StatisticsFunnelCounter> funnelCounterList);


    /**
     * 通过传入的漏斗转化统计实体参数及其他可能的附加条件，构造分页的查询结果
     * @param funnelCounter
     * @param params
     * @param page
     * @return
     */
    List<StatisticsFunnelCounter> listPageByOthers(StatisticsFunnelCounter funnelCounter, Map<String, Object> params, Page page);

    /**
     * 获取漏斗流程的统计数
     *
     * @param params 参数
     * @return 漏斗流程列表
     */
    List<StatisticsFunnelCounter> findByFunnelFlowId(Map<String, Object> params);

    StatisticsFunnelCounter getUnique(StatisticsFunnelCounter counter);
}
